package itheima.moc.Testsoket5;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class ServiceDemo {
    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket(10000);

        Socket accept = ss.accept();
        InputStream is = accept.getInputStream();
        int a;
        while ((a=is.read())!=-1){
            System.out.print((char) a);
        }
        is.close();
        ss.close();
    }
}
